var app = getApp()
Component({
    properties: {
        count: String,
        type: String // publish， message
    },
    data: {
        hidden: true
    },
    methods: {
        changeListStatus() {
            this.setData({
                hidden: !this.data.hidden
            })
            this.triggerEvent('change', this.data.hidden ? 'hidden' : 'show')
        },
        scanCode() {
            wx.scanCode({
                success(res){
                    var result = res.result.split("params=")
                    if (result.length ==2) {
                        wx.navigateTo({
                            url: `${app.xhx_route.babyInvite}?params=${result[1]}`
                        })
                    }
                        
                }
            })
        },
        navigateToInvite(){
            wx.navigateTo({
                url: app.xhx_route.babyInputeQrcode
            })
        }
    }
})